package main

import (
	"fmt"
	"time"
)

func main() {
	chan1 := make(chan int, 3)
	chan2 := make(chan int, 3)
	chan2 <- 2
	chan2 <- 2
	chan2 <- 2
	go func() {
		for i := 0; i <= 10; i++ {
			chan1 <- <-chan2
			fmt.Println(i)
		}
	}()
	time.Sleep(1 * time.Second)
}
